﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="AddMovieLink.aspx.cs" Inherits="Admin_Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="top-bar select-bar">
        <a href="AddMovie.aspx" class="button">Add Movie</a> <a href="AddMovieScreenShots.aspx"
            class="button">Add Screen</a>
        <h1>
            <b>Add Movie Link </b>
        </h1>
          <asp:Label ID="lblmsg" Font-Bold="true" Width="100%" runat="server" BackColor="Red"
            ForeColor="White" EnableTheming="False"></asp:Label>
    </div>
    <br />
    <div>
        <table width="130%" cellpadding="3px" cellspacing="10px">
            <tr>
                <td>
                    <asp:Label ID="lblSubCategory" Font-Bold="true" runat="server" Text="Select Sub Category: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlSubCategory" runat="server" Width="100%"  AutoPostBack="True" 
                        onselectedindexchanged="ddlSubCategory_SelectedIndexChanged">
                                              <asp:ListItem Text="------Select Movie Category------" Value="0"></asp:ListItem> 
                    </asp:DropDownList>
                </td>
                
                  <td>
                    <asp:Label ID="lblMovie" Font-Bold="true" runat="server" Text="Select Movie: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlMovie" runat="server" Width="100%" AutoPostBack="true" onselectedindexchanged="ddlMovie_SelectedIndexChanged">
                        <asp:ListItem Text="------Select Movie------" Value="0"></asp:ListItem>                      
                    </asp:DropDownList>
                </td>
            </tr>
           
            <tr>
                <td>
                    <asp:Label ID="lblMoviePartNo" Font-Bold="true" runat="server" Text="Movie Part No: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtMoviePartNo" runat="server" Width="100%"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblMovieLink" Font-Bold="true" runat="server" Text="Download Link: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtMovieLink" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
           
            <tr>
                <td>
                    <asp:Label ID="lblMovieLinkSize" Font-Bold="true" runat="server" Text="Download Link Size: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtMovieLinkSize" runat="server" Width="100%"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblLinkOwner" Font-Bold="true" runat="server" Text="Link Owner: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtLinkOwner" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
           
            <tr>
                <td>
                </td>
                <td align="right" colspan="4">
                    <asp:Button ID="btnAddMovie" Width="15%" Font-Bold="true" OnClientClick="return ValidateMovieDownloadLink('ddlSubCategory','ddlMovie','txtMoviePartNo','txtMovieLink','txtMovieLinkSize','txtLinkOwner')"
                        Text="Add" runat="server" onclick="btnAddMovie_Click" />
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div class="table">
        <asp:GridView ID="grdMovieDownloadLink" runat="server" AutoGenerateColumns="false"
            ShowHeader="true">
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        <asp:Label ID="lblLinkID" Text='<%# DataBinder.Eval(Container.DataItem,"MovieLinkID")%>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Movie Part No">
                    <ItemTemplate>
                        <asp:Label ID="lblPartNo" Text='<%# DataBinder.Eval(Container.DataItem,"PartNo")%>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Download Link">
                    <ItemTemplate>
                    <asp:LinkButton ID="lnkDownloadLink" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"LinkPath")%>' PostBackUrl='<%# DataBinder.Eval(Container.DataItem,"LinkPath")%>'></asp:LinkButton>
                        <asp:Label ID="lblDownloadLink" Text="Movie" runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Download Link Size">
                    <ItemTemplate>
                        <asp:Label ID="lblLinkSize" Text='<%# DataBinder.Eval(Container.DataItem,"LinkSize")%>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Link Owner">
                    <ItemTemplate>
                        <asp:Label ID="lblOwner" Text='<%# DataBinder.Eval(Container.DataItem,"LinkOwner")%>' runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" EditImageUrl="~/Admin/img/edit-icon.gif"
                    ButtonType="Image"/>
            </Columns>
            <AlternatingRowStyle BackColor="ButtonShadow" />
            <HeaderStyle BackColor="SpringGreen" />
        </asp:GridView>
    </div>
</asp:Content>
